public class Mfiv {
    public void mofiv(Student[] star){
        for (int i=0;i<star.length;i++){
            if (star[i].grade==3){
                System.out.println("id为"+star[i].id+"班级为"+star[i].grade+"成绩为"+star[i].score);
            }
        }
    }
    public void sofe(Student[] star){
        Student tmp;//中间的临时变量
        for (int i = 0; i < 19; i++) {  //外循环控制比较轮数
            for (int j = 0; j < 19; j++) { //内层循环控制每轮比较的次数
                if (star[j].score > star[j + 1].score) {
                    tmp = star[j];
                    star[j] = star[j + 1];
                    star[j + 1] = tmp;
                }
            }
        }}
        public void nos(Student[] star){
            for (Student stu:star) {
                stu.yes();
            }
        }
}